package com.zhang.cloud.service;


import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "hystrix")
//@FeignClient(value = "hystrix",fallback = FeignHystrixFallback.class)//为该接口的每个方法定义fallback
public interface FeignHystrixService {

    @GetMapping("/pay/hystrix/ok/{id}")
    public String paymentInfo_ok(@PathVariable("id")Integer id);
    @GetMapping("/pay/hystrix/timeout/{id}")
    public String paymentInfo_timeout(@PathVariable("id")Integer id);
    @GetMapping("/pay/hystrix/circuit/{id}")
    public String paymentCircuitBreaker(@PathVariable("id") Integer id);
}
